auto.waitFor();
// console.show()
const { mypassword } = hamibot.env;
const { isdebug } = hamibot.env;
const { xy } = hamibot.env;


if(isdebug){
 sleep(2000)
 console.log(isdebug)
}
//console.log(mypassword)
// 输入密码
function password_input()
{
    // password = "521990"
    for(var i = 0; i < mypassword.length; i++)
    {
        var p = text(mypassword[i].toString()).findOne().bounds();
        click(p.centerX(), p.centerY());
        sleep(50);
    }
}
 
// 解锁屏幕
function unlock()
{
    if(!device.isScreenOn())
    {
        device.wakeUp();
        sleep(500);
        swipe(500,2000,500,1000,210);
        password_input();
    }
}
 
unlock();
sleep(500)
if(xy&&xy.indexOf(',')>0){
	click(parseInt(xy.split(',')[0]),parseInt(xy.split(',')[1]))
}
